<?php

namespace app\common\model;

class CommonDataDict extends Base {
    public static $statusArr;
    protected $append = ['status_text'];
    // 模型初始化
    protected static function init()
    {
        self::$statusArr = get_data_dict('dict_status');
    }

    public function getStatusTextAttr($value,$data)
    {
        if(strlen($data['status']) <= 0 || empty(self::$statusArr)){
            return '';
        }
        return self::$statusArr[$data['status']];
    }
}
